{% extends "html/base_authenticated.html" %}

{% block title %}Upload File{% endblock %}

{% block page_id %}upload-worksheet-page{% endblock %}

{% block main %}

<div>
    <h2>Upload worksheet to the Sage Notebook</h2>
    <p>Supported file formats:</p>
    <ul class="simple">
    <li><tt>.sws</tt> - a Sage worksheet</li>
    <li><tt>.html</tt> or <tt>.txt</tt> - a worksheet text file with html code and cells surrounded by <tt>&#123;&#123;&#123;</tt> and <tt>&#125;&#125;&#125;</tt> that defines a worksheet</li>
    <li><tt>.html</tt> - the URL of a page of the Sage Documentation, for example the URL of <a class="reference external" href="http://www.sagemath.org/doc/reference/sage/rings/integer.html">this page</a></li>
    <li><tt>.html</tt> - an HTML page generated by docutils from a ReStructuredText file</li>
    <li><tt>.rst</tt> - a ReStructuredText file (Add "<tt>.. escape-backslashes</tt>" as a line in the file if you want backslashes to be escaped. Put latex code inside backticks "<tt>`</tt>" or dollar signs "<tt>$</tt>" or "<tt>$$</tt>". Math role is not supported for now.)</li>
    <li><tt>.zip</tt> - a zip archive of any of the above</li>
    </ul>
    <form method="POST" action="upload_worksheet"
          name="upload" enctype="multipart/form-data">
        <div>
            <label for="file">Browse your computer to select a file to upload:</label>
            <input size="50" type="file" name="file" />
        </div>
        <div>
            <label for="url">Or enter the URL of a file on the web:</label>
            <input size="50" type="text" name="url" />
        </div>
        <div>
            <label for="name">What do you want to call it? (if different than the original name)</label>
            <input size="50" type="text" name="name" />
        </div>
        <button type="submit">Upload Worksheet</button>
    </form>
</div>
{% endblock %}
